home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group97a.txt / 000102_icon-group-sender _Mon Apr 7 12:28:36 1997.msg < prev    next >
Internet Message Format  |  2000-09-20  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 8 Apr 1997 13:31:19 MST
  2. Sender: ko@surya.ho.att.com
  3. Message-Id: <334920B4.59CE@surya.ho.att.com>
  4. Date: Mon, 07 Apr 1997 12:28:36 -0400
  5. From: Kostas Oikonomou <ko@surya.ho.att.com>
  6. Organization: AT&T Bell Labs
  7. X-Mailer: Mozilla 3.0 (X11; I; SunOS 5.5.1 sun4c)
  8. Mime-Version: 1.0
  9. To: icon-group@cs.arizona.edu
  10. Subject: Problem with Icon 9.3
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. Errors-To: icon-group-errors@cs.arizona.edu
  14. Status: RO
  15. Content-Length: 613
  16.  
  17. Hi,
  18.  
  19. I have the following simple (I think) program:
  20.  
  21. link ximage
  22.  
  23. procedure main()
  24.  
  25.   # The state diagram.
  26.   sd := table([])
  27.   sd[["q0","ok"]] := "q1"
  28.   sd[["q0","nok"]] := "q0"
  29.   sd[["q1","nok"]] := "q0"
  30.   sd[["q1","ok"]] := "q2"
  31.   # q2 is the final state
  32.  
  33.   every x := key(sd) do write(ximage(x), ":", sd[x])
  34.  
  35. end
  36.  
  37. This doesn't behave as I think it should.  The problem seems to be a
  38. table whose keys are lists.  Is there something wrong with this kind of
  39. structure?  I don't see anything to that effect in the 3d edition of the
  40. Icon book, Ch. 6 on tables.
  41.  
  42. I'd appreciate your help.
  43. -- 
  44.                     Kostas Oikonomou
  45.